package com.gof.example.template;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/12 21:19.
 * haiming.fei@tongdun.cn
 */
public abstract class Storable {

    public void save() {
        beforeStore();
        store();
        afterstore();
    }

    public void beforeStore() {
        System.out.println("request data");
    }

    public void afterstore() {
        System.out.println("response data");
    }

    abstract void store();
}
